package com.kitten.search.api.api;

import com.kitten.framework.common.response.Response;
import com.kitten.search.api.constant.ApiConstants;
import com.kitten.search.api.dto.RebuildNoteDocumentReqDTO;
import com.kitten.search.api.dto.RebuildUserDocumentReqDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author kitten
 */
@FeignClient(name = ApiConstants.SERVICE_NAME)
public interface SearchFeignApi {

    String PREFIX = "/search";

    @PostMapping(value = PREFIX + "/note/rebuild")
    Response<Long> rebuildNoteDocument(@RequestBody RebuildNoteDocumentReqDTO rebuildNoteDocumentReqDTO);

    @PostMapping(value = PREFIX + "/user/rebuild")
    Response<Long> rebuildUserDocument(@RequestBody RebuildUserDocumentReqDTO rebuildUserDocumentReqDTO);

}
